<!DOCTYPE html>
<html>
    <head>
        <title>AGM销售列表</title>
        <link rel="stylesheet" href="/static/weui.min.css">
        <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
        <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <style>
            .page, body{background-color: #fbf9fe}
            .page_title{color:#225fba}
            .hd{text-align:center}
            .bd{max-width:1000px;margin:auto;}
            .weui_label{width:4em;}
            .bd{padding-bottom:30px;}
            .weui_cell_hd img{height: 40px;}
            .weui_cell_bd {
                white-space: nowrap;
                overflow: auto;
            }
            /*.weui_cell_ft{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;}*/
            .iconMenuBadge {
                position: absolute;
                top: 2px;
                left: 2px;
            }
            .buttonBadge {
                position: absolute;
                top: -9px;
                left: -15px;
            }
            .badge {
              background: radial-gradient( 5px -9px, circle, white 8%, red 26px );
                background: -moz-radial-gradient( 5px -9px, circle, white 8%, red 26px );
                background: -ms-radial-gradient( 5px -9px, circle, white 8%, red 26px );
                background: -o-radial-gradient( 5px -9px, circle, white 8%, red 26px );
                background: -webkit-radial-gradient( 5px -9px, circle, white 8%, red 26px );
              background-color: red;
              border: 2px solid white;
              border-radius: 12px; /* one half of ( (border * 2) + height + padding ) */
              box-shadow: 1px 1px 1px black;
              color: white;
              font: bold 15px/13px Helvetica, Verdana, Tahoma;
              height: 16px; 
              padding: 4px 3px 0 3px;
              text-align: center;
              min-width: 14px;
            }
            .nav_right{position: absolute;right: 5px;width: 35px;top: 5px;}
            .weui_actionsheet_menu a .weui_actionsheet_cell{color:initial;border-top: 1px solid #d9d9d9;} 
        </style>
    </head>
    <body>
        <div id='wx_logo' style="display:none;"><img src="/static/images/wx_logo.jpg"/></div>
        <div class="hd">
            <h2 class="page_title">AGM销售列表</h2> 
            <img src="/static/images/icon_nav_cell.png" class="nav_right">
        </div>
        <div class="bd">
            <div class="weui_cells_title">等待审核的销售</div>
            <div class="weui_cells weui_cells_access">
                {% for seller in sellers0 %}
                <a class="weui_cell" href="sellerinfo?uid={{seller.id}}">
                    <div class="weui_cell_hd"><img src="{{seller.get('headimgurl') or '/static/images/getheadimg.png'}}"></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>{{seller.get('nickname')}}({{seller.get('dealername')}})</p>
                    </div>
                    <div class="weui_cell_ft">{#{{seller.get('shopname')}}#}<i class="weui_icon_waiting_circle"></i></div>
                </a>
                {% endfor %}
            </div>
            <div class="weui_cells_title">已通过审核的销售</div>
            <div class="weui_cells weui_cells_access">
                {% for seller in sellers1 %}
                <a class="weui_cell" href="selleraward?uid={{seller.id}}">
                    <div class="weui_cell_hd"><img src="{{seller.get('headimgurl') or '/static/images/getheadimg.png'}}"></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>{{seller.get('nickname')}}({{seller.get('dealername')}})</p>
                    </div>
                    <div class="weui_cell_ft">{#{{seller.get('shopname')}}#}<i class="weui_icon_success_circle"></i><span class="badge iconMenuBadge">{{seller.r_count}}</span></div>
                </a>
                {% endfor %}
            </div>
            <div class="weui_cells_title">已取消资格的销售</div>
            <div class="weui_cells weui_cells_access">
                {% for seller in sellers2 %}
                <a class="weui_cell" href="selleraward?uid={{seller.id}}">
                    <div class="weui_cell_hd"><img src="{{seller.get('headimgurl') or '/static/images/getheadimg.png'}}"></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>{{seller.get('nickname')}}({{seller.get('dealername')}})</p>
                    </div>
                    <div class="weui_cell_ft">{#{{seller.get('shopname')}}#}<i class="weui_icon_cancel"></i><span class="badge iconMenuBadge">{{seller.r_count}}</span></div>
                </a>
                {% endfor %}                
            </div> 
        </div>
        <div id="actionSheet_wrap" style="display: none;">
            <div class="weui_mask_transition" id="mask" style="display: none;"></div>
            <div class="weui_actionsheet" id="weui_actionsheet">
                <div class="weui_actionsheet_menu">
                    <a href="sellerrank"><div class="weui_actionsheet_cell">销售排行</div></a>
                    <a href="sellerlist"><div class="weui_actionsheet_cell">销售列表</div></a>
                    {% if not session.get('role') %}<a href="dealersetting"><div class="weui_actionsheet_cell">经销商设置</div></a>{% endif %}
                </div>
                <div class="weui_actionsheet_action">
                    <div class="weui_actionsheet_cell" id="actionsheet_cancel">取消</div>
                </div>
            </div>
        </div>         
    </body>
    <script>
        $('.nav_right').click(function(){
            $('#actionSheet_wrap').show()
            var mask = $('#mask');
            var weuiActionsheet = $('#weui_actionsheet');
            weuiActionsheet.addClass('weui_actionsheet_toggle');
            mask.show().addClass('weui_fade_toggle').one('click', function () {
                hideActionSheet(weuiActionsheet, mask);
            });
            $('#actionsheet_cancel').one('click', function () {
                hideActionSheet(weuiActionsheet, mask);
            });
            weuiActionsheet.unbind('transitionend').unbind('webkitTransitionEnd');

            function hideActionSheet(weuiActionsheet, mask) {
                weuiActionsheet.removeClass('weui_actionsheet_toggle');
                mask.removeClass('weui_fade_toggle');
                weuiActionsheet.on('transitionend', function () {
                    mask.hide();
                    $('#actionSheet_wrap').css('display', 'none')
                }).on('webkitTransitionEnd', function () {
                    mask.hide();
                    $('#actionSheet_wrap').css('display', 'none')
                })
            }
        })   
    </script>
<html>
